package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RuleMapper;
import com.ruoyi.system.domain.Rule;
import com.ruoyi.system.service.IRuleService;

/**
 * 配置类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-19
 */
@Service
public class RuleServiceImpl implements IRuleService 
{
    @Autowired
    private RuleMapper ruleMapper;

    /**
     * 查询配置类别
     * 
     * @param ruleId 配置类别主键
     * @return 配置类别
     */
    @Override
    public Rule selectRuleByRuleId(Long ruleId)
    {
        return ruleMapper.selectRuleByRuleId(ruleId);
    }

    /**
     * 查询配置类别列表
     * 
     * @param rule 配置类别
     * @return 配置类别
     */
    @Override
    public List<Rule> selectRuleList(Rule rule)
    {
        return ruleMapper.selectRuleList(rule);
    }

    /**
     * 新增配置类别
     * 
     * @param rule 配置类别
     * @return 结果
     */
    @Override
    public int insertRule(Rule rule)
    {
        return ruleMapper.insertRule(rule);
    }

    /**
     * 修改配置类别
     * 
     * @param rule 配置类别
     * @return 结果
     */
    @Override
    public int updateRule(Rule rule)
    {
        return ruleMapper.updateRule(rule);
    }

    /**
     * 批量删除配置类别
     * 
     * @param ruleIds 需要删除的配置类别主键
     * @return 结果
     */
    @Override
    public int deleteRuleByRuleIds(Long[] ruleIds)
    {
        return ruleMapper.deleteRuleByRuleIds(ruleIds);
    }

    /**
     * 删除配置类别信息
     * 
     * @param ruleId 配置类别主键
     * @return 结果
     */
    @Override
    public int deleteRuleByRuleId(Long ruleId)
    {
        return ruleMapper.deleteRuleByRuleId(ruleId);
    }
}
